/*
    @file: log/logger/LogData.h
    @author: Wolfhead
*/
#ifndef _LOG_LOG_DATA_H_
#define _LOG_LOG_DATA_H_

#include "LogContext.h"
#include "LogPriority.h"

namespace logger
{

class LogData
{
public:

    LogData()
    {

    }

    LogData(LogPriority pri, const LogContext& ctx, const std::string& str = "")
        : priority(pri), message(str), context(ctx), by_name(false)
    {

    }

    LogData(const std::string n, const LogContext& ctx, const std::string& str = "")
        : priority(kName), name(n), message(str), context(ctx), by_name(true)
    {

    }    

    LogPriority  priority;
    std::string  name;
    std::string  message;
    LogContext   context;
    bool         by_name;
};

typedef boost::shared_ptr<LogData> LogDataPtr;

}//namespace logger

#endif // #ifndef _LOG_LOG_DATA_H_
